<?php
/**
 * Created by JetBrains PhpStorm.
 * User: Andrey
 * Date: 26.01.12
 * Time: 19:13
 * To change this template use File | Settings | File Templates.
 */
class Location_Model extends My_Model
{
    protected function _init()
    {
        $this->_table = 'location';
    }

    public function getCollection()
    {
        $this->db->query("SELECT * FROM location");
        $results = array();

        while($row = $this->db->next()) {
            $_model = new Location_Model();
            $_model->setData($row);
            $results[] = $_model;
        }

        reset($results);
        return $results;
    }
}
